From 0e2648e8c23a57c497c9c7b8245e3182332ae7e9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 21 Nov 2015 00:51:22 +0100 Subject: [PATCH] customproperty: Stop supporting the parsing of values Now that we don't use custom CSS properties anymore, let's fail as early as possible. --- gtk/gtkcsscustomproperty.c | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c index d401759a61..fbaa8400bc 100644 --- a/gtk/gtkcsscustomproperty.c +++ b/gtk/gtkcsscustomproperty.c @@ -51,40 +51,10 @@ static GtkCssValue * gtk_css_custom_property_parse_value (GtkStyleProperty *property, GtkCssParser *parser) { - GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (property); - GValue value = G_VALUE_INIT; - gboolean success; - - if (custom->property_parse_func) - { - GError *error = NULL; - char *value_str; - - g_value_init (&value, _gtk_style_property_get_value_type (property)); - - value_str = _gtk_css_parser_read_value (parser); - if (value_str != NULL) - { - success = (* custom->property_parse_func) (value_str, &value, &error); - g_free (value_str); - } - else - success = FALSE; - } - else - { - g_value_init (&value, gtk_css_custom_property_get_specified_type (custom->pspec)); - - success = _gtk_css_style_funcs_parse_value (&value, parser); - } - - if (!success) - { - g_value_unset (&value); - return NULL; - } - - return _gtk_css_typed_value_new_take (&value); + _gtk_css_parser_error_full (parser, + GTK_CSS_PROVIDER_ERROR_NAME, + "Custom CSS properties are no longer supported."); + return NULL; } static void -- 2.30.2